<template>
  <div>{{ num }}</div>
  <button @click="num++">+</button>
</template>

<script setup>
import {useCounterStore} from "@/stores/counter";
import {storeToRefs} from "pinia";

let counterStore = useCounterStore();
let {num} = storeToRefs(counterStore);

function toReduce() {
  num--;
}

</script>

<style scoped>

</style>
